Git Gud

Federico Igne ยท OxRAM

What is Git?

XKCD 1597: Git (CC BY-NC 2.5)
  • a version control system.

  • keeps track of code snapshots in time.

  • decentralised and content agnostic.

What is Git?

Originally created by Linus Torvalds

Installing

An overview

Initialise a repository

โ€œG2 Mobilizonโ€ by David Revoy (CC-BY)

Initialise a repository

  • git init

  • git clone <url>

Inspect a repository

โ€œF5 CHATONSโ€ by David Revoy (CC-BY)

Inspect a repository

  • git status

  • git log and variations

  • git show <commit>

Prepare for a new commit

โ€œB1 Framadateโ€ by David Revoy (CC-BY)

Prepare for a new commit

  • git add <path>

  • git restore <path>

Commit changes

โ€œD3 Supportโ€ by David Revoy (CC-BY)

Commit changes

  • git commit

Branch out

โ€œD4 Alternative a Framasoftโ€ by David Revoy (CC-BY)

Branch out

  • git branch

  • git branch <name>

  • git checkout <target>

  • git checkout -b <name> <target>

  • git merge

Collaborate with others

โ€œC4 Framalangโ€ by David Revoy (CC-BY)

Collaborate with others

  • git remote

  • git pull <remote> <branch>

  • git push <remote> <branch>

Final remarks

XKCD 1296: Git Commit (CC BY-NC 2.5)

Where to go from here?

Questions?

โ€œErreur 404 illustrationโ€ by David Revoy (CC-BY)